package com.burger.dao;

import com.burger.domain.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface LoginDao {

    @Select("select * from db_user where name = #{name} and password = #{password}")
    public User login(User user);

    @Select("select * from db_user")
    public List<User> findAll();

    @Insert("insert into db_user values(#{name},#{password})")
    public void register(User user);

    @Select("select * from db_user where name = #{name}")
    public User findByName(String name);
}
